package framework.editors
{

	public class PropertyListerManager
	{
		static private var propertyListers:Array = [ new DefaultPropertyLister, new XMLPropertyLister ];

		public function PropertyListerManager()
		{
		}

		static public function registerPropertyLister(propLister:IPropertyLister):void
		{

		}

		static public function getBestPropertyLister(obj:*):IPropertyLister
		{
			var bestPriority:int = 0;
			var currentChoice:IPropertyLister;
			for each (var pl:IPropertyLister in propertyListers)
			{
				var priority:int = pl.canList(obj);
				if (priority > bestPriority)
				{
					currentChoice = pl;
					bestPriority = priority;
				}
			}
			return currentChoice;
		}

		static public function list(obj:*):Array
		{
			return getBestPropertyLister(obj).list(obj);
		}

		static public function isDynamic(obj:*):Boolean
		{
			return getBestPropertyLister(obj).isDynamic(obj);
		}
	}
}